
import deepCopy from '../../../functions/deep-copy';


const batchAddSubTemplate = 'batchAddSub';
const batchAddSubTaleTemplate = 'batchAddSubTaleTemplate';

export default function() {
    const {
        currentForm
    } = this.state;

    if(!currentForm) {
        return null
    }

    const {
        meta: {
            getMeta,
            setMeta
        },
        form: {
            setFormStatus
        }
    } = this.props;

    let template = getMeta();


    template[batchAddSubTemplate] = deepCopy(template[currentForm]);
    template[batchAddSubTemplate].moduletype = 'form';
    setFormStatus(batchAddSubTemplate, 'edit');

    setMeta(template);
}
